<html>
<head><meta charset="utf-8"><title>Removing From&lt;Scalar&gt; · project-portable-simd · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/index.html">project-portable-simd</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html">Removing From&lt;Scalar&gt;</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="225261786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225261786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225261786">(Feb 05 2021 at 05:00)</a>:</h4>
<p>Thoughts on removing <code>From&lt;Scalar&gt;</code> implementations on vectors?  The implementation is definitely valid but I'm not sure splatting really qualifies as a conversion</p>



<a name="225303386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225303386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225303386">(Feb 05 2021 at 14:18)</a>:</h4>
<p>having from scalar <em>or</em> math ops that just plain accept scalars is important for actually writing the code that uses simd types.</p>



<a name="225303790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225303790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225303790">(Feb 05 2021 at 14:22)</a>:</h4>
<p>because of literals, if you want to double a vec you write something like <code>v * 2.0</code> or <code>v * 2.0.into()</code></p>



<a name="225313458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225313458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225313458">(Feb 05 2021 at 15:35)</a>:</h4>
<p>I'm okay with the math ops taking scalars directly, I only mean the From trait.  I thought using <code>into</code> with operators doesn't work anyway, since you end up with a double inference problem?</p>



<a name="225332903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225332903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225332903">(Feb 05 2021 at 17:54)</a>:</h4>
<p>I think requiring <code>splat(x)</code> instead of <code>from(x)</code> makes sense.</p>
<p>My usual heuristic is whether a <code>TryFrom</code> going the other way would make sense, and while it would be possible to have it only succeed if all the lanes have the same value, that seems way too weird to be useful.</p>



<a name="225363721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225363721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225363721">(Feb 05 2021 at 22:02)</a>:</h4>
<p>Yeah, I think keeping splat(x) but having ops explicitly accept scalar types and splat them makes more sense than keeping From.</p>



<a name="225364309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225364309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225364309">(Feb 05 2021 at 22:07)</a>:</h4>
<p>I <strong>could</strong> see Rust having <code>f32 as f32x4</code>, but we wouldn't have the reverse, we might have <code>f32x4 as [f32; 4]</code>?</p>



<a name="225368071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225368071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225368071">(Feb 05 2021 at 22:44)</a>:</h4>
<p>Am I understanding correctly that <code>From&lt;Scalar&gt;</code> let's you write something like</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">f32x4</span><span class="p">(</span><span class="mf">4.0</span><span class="k">f32</span><span class="p">);</span><span class="w"></span>
</code></pre></div>
<p>That seems like something nice for making masks, but I don't know why having it as a Trait is a drawback.</p>



<a name="225368473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225368473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225368473">(Feb 05 2021 at 22:48)</a>:</h4>
<p><span class="user-mention" data-user-id="246783">@Miguel Raz Guzmán Macedo</span> specifically it is fn from and fn into, on the From and Into traits, and Rust applies automatic usage of them in a lot of places so having it in a spot is both great and also bad, because Rust is better at applying those functions and knowing which to select if there are <strong>less</strong> choices.</p>



<a name="225373846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225373846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225373846">(Feb 05 2021 at 23:59)</a>:</h4>
<p>if f32x4 can be directly multiplied with 2.0 then I don't care about the extra character in <code>splat</code> vs <code>from</code>.</p>



<a name="225374450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225374450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225374450">(Feb 06 2021 at 00:05)</a>:</h4>
<p>Is there a problem specifically with literals or am I misunderstanding?</p>



<a name="225375622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225375622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225375622">(Feb 06 2021 at 00:23)</a>:</h4>
<p>well having to write <code>x * f32x4::splat(2.0)</code> all across a code base just gets very ugly very fast.</p>



<a name="225375712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225375712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225375712">(Feb 06 2021 at 00:24)</a>:</h4>
<p>Right, but the operators we have right now auto-splat</p>



<a name="225375718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225375718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225375718">(Feb 06 2021 at 00:24)</a>:</h4>
<p>I think I just misunderstood</p>



<a name="225375846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225375846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225375846">(Feb 06 2021 at 00:26)</a>:</h4>
<p>I suppose it won't be as clean for associated fns like saturated_add, but we have discussed a splat trait</p>



<a name="225378299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/225378299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#225378299">(Feb 06 2021 at 01:14)</a>:</h4>
<p>FWIW, I think the difference between <code>x * 2.0</code> and <code>x * splat(2.0)</code> is pretty bad, but once it's <code>x.saturated_add(2.0)</code> vs <code>x.saturated_add(splat(2.0))</code> it doesn't feel nearly as onerous to me.</p>



<a name="226546614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226546614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226546614">(Feb 16 2021 at 17:29)</a>:</h4>
<p>...ugh, my brain said "what if we <code>impl Add&lt;T: Into&lt;SimdF32&gt;&gt; for SimdF32</code> tho'"</p>



<a name="226546723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226546723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226546723">(Feb 16 2021 at 17:30)</a>:</h4>
<p>but now I'm trying to remember if that ever can succeed inference</p>



<a name="226546756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226546756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226546756">(Feb 16 2021 at 17:30)</a>:</h4>
<p>Hmm I really doubt it</p>



<a name="226546859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226546859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226546859">(Feb 16 2021 at 17:31)</a>:</h4>
<p>Also I'm not sure that's semantically correct? It would allow you to add arrays for example</p>



<a name="226546886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226546886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226546886">(Feb 16 2021 at 17:31)</a>:</h4>
<p>sounds good!</p>



<a name="226546891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226546891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226546891">(Feb 16 2021 at 17:31)</a>:</h4>
<p>&lt;_&lt;;</p>



<a name="226546984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226546984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226546984">(Feb 16 2021 at 17:32)</a>:</h4>
<p>OK, so, less silly: as long as the lengths and such work out, it'd be nice to just pretend you're writing APL in Rust.</p>



<a name="226547056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547056">(Feb 16 2021 at 17:32)</a>:</h4>
<p>OK that's still pretty silly BUT</p>



<a name="226547220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547220">(Feb 16 2021 at 17:33)</a>:</h4>
<p>I think the thing that's confusing to me is that <code>vector + scalar.into()</code> doesn't really illustrate what at all the conversion is doing.  <code>vector + scalar</code> makes sense mathematically, it just happens to splat in an efficient implementation (it could be written without one but it would be bad)</p>



<a name="226547408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547408">(Feb 16 2021 at 17:35)</a>:</h4>
<p>Yeah it's kinda funny because I would <strong>only</strong> want this to be there for splatting implicitly.</p>



<a name="226547551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547551">(Feb 16 2021 at 17:36)</a>:</h4>
<p>I think I've convinced myself that vector-scalar operations and splatting are completely independent operations</p>



<a name="226547635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547635">(Feb 16 2021 at 17:36)</a>:</h4>
<p>There could conceivably be an architecture that provides that as a single operation</p>



<a name="226547679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547679">(Feb 16 2021 at 17:36)</a>:</h4>
<p>(though I doubt there is or will be)</p>



<a name="226547697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547697">(Feb 16 2021 at 17:37)</a>:</h4>
<p><em>contemplatively</em> would we want to auto-splat then?</p>



<a name="226547745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547745">(Feb 16 2021 at 17:37)</a>:</h4>
<p>I mean it doesn't matter, actually, because we do the splatting behind our impl, and we can change the internals of the impl.</p>



<a name="226547752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547752">(Feb 16 2021 at 17:37)</a>:</h4>
<p>I think we shouldn't think of it as auto-splatting, it's just adding a scalar to a vector</p>



<a name="226547760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547760">(Feb 16 2021 at 17:37)</a>:</h4>
<p>Yeah</p>



<a name="226547810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547810">(Feb 16 2021 at 17:37)</a>:</h4>
<p>And yeah, I am pretty sure such an architecture actually exists already.</p>



<a name="226547898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547898">(Feb 16 2021 at 17:38)</a>:</h4>
<p>It's like if you have a complex number and add a real number.  Do you convert to a complex number and then add? Or do you add the real number just to the real part? It's just an implementation detail</p>



<a name="226547916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547916">(Feb 16 2021 at 17:38)</a>:</h4>
<p>because that sounds a lot like how certain GLSL operations could happen.</p>



<a name="226547930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547930">(Feb 16 2021 at 17:38)</a>:</h4>
<p>Right.</p>



<a name="226547981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547981">(Feb 16 2021 at 17:39)</a>:</h4>
<p>I would hope that the splat then add would optimize correctly in that case</p>



<a name="226547992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226547992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226547992">(Feb 16 2021 at 17:39)</a>:</h4>
<p>I think the only "objection" per se that I really have is that it would actually be fine if we had SimdF32&lt;4&gt; + [f32;4] work.</p>



<a name="226548065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226548065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226548065">(Feb 16 2021 at 17:39)</a>:</h4>
<p>I think I disagree, you should convert there, but if we did want that to exist we could just implement that Add trait</p>



<a name="226548143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226548143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226548143">(Feb 16 2021 at 17:40)</a>:</h4>
<p>why actually? It's still a logical equivalent.</p>



<a name="226548195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226548195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226548195">(Feb 16 2021 at 17:40)</a>:</h4>
<p>I think conversions should be explicit anywhere performance might be questionable</p>



<a name="226548205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226548205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226548205">(Feb 16 2021 at 17:40)</a>:</h4>
<p>hmm.</p>



<a name="226548259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226548259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226548259">(Feb 16 2021 at 17:40)</a>:</h4>
<p>...oh no that means we have to bench this.</p>



<a name="226548324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226548324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226548324">(Feb 16 2021 at 17:41)</a>:</h4>
<p>I don't think so</p>



<a name="226548363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226548363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226548363">(Feb 16 2021 at 17:41)</a>:</h4>
<p>The array could be in memory and unaligned</p>



<a name="226548428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226548428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226548428">(Feb 16 2021 at 17:42)</a>:</h4>
<p>hmm.</p>



<a name="226548531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226548531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226548531">(Feb 16 2021 at 17:42)</a>:</h4>
<p>You could write something where that optimizes well sure</p>



<a name="226548745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226548745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226548745">(Feb 16 2021 at 17:44)</a>:</h4>
<p>but if we know it's an [f32; 4] then why wouldn't it be aligned?</p>



<a name="226548791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226548791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226548791">(Feb 16 2021 at 17:44)</a>:</h4>
<p>wait</p>



<a name="226548805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226548805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226548805">(Feb 16 2021 at 17:44)</a>:</h4>
<p>the alignment of it is 4 bytes, right</p>



<a name="226548936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226548936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226548936">(Feb 16 2021 at 17:45)</a>:</h4>
<p>I also think an array just conveys a different meaning</p>



<a name="226549009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226549009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226549009">(Feb 16 2021 at 17:46)</a>:</h4>
<p>right, OK, you could have a hypothetical situation where you're reading that in and it's not aligned to 16 bytes so the array could be found at 12 or 4 or 20 instead of 0, 16, 32, etc.</p>



<a name="226549059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226549059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226549059">(Feb 16 2021 at 17:46)</a>:</h4>
<p>Maybe negligibly here but <code>array.into()</code> is pretty minimal</p>



<a name="226549065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226549065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226549065">(Feb 16 2021 at 17:46)</a>:</h4>
<p>Yeah</p>



<a name="226549091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226549091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226549091">(Feb 16 2021 at 17:46)</a>:</h4>
<p>And more than hypothetical but probable if you're throwing around lots of arrays.</p>



<a name="226549290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226549290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226549290">(Feb 16 2021 at 17:47)</a>:</h4>
<p>OK fair! explicit type conversion based on alignment actually completely satisfies me here. I... disagree on the idea that it's really that different in terms of overall data meaning though.</p>



<a name="226549364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226549364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226549364">(Feb 16 2021 at 17:48)</a>:</h4>
<p>but I may not understand what the difference is that you see.</p>



<a name="226549625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226549625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226549625">(Feb 16 2021 at 17:50)</a>:</h4>
<p>It's not very different, a SIMD vector is just a special type of array</p>



<a name="226549671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226549671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226549671">(Feb 16 2021 at 17:50)</a>:</h4>
<p>This also resolves my last question about whether we should remove From&lt;Scalar&gt;. The answer is clearly yes, today, although I might come back to this subject if an experiment I am likely to undertake bears fruit. Later. <strong>Not</strong> today.</p>



<a name="226549676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226549676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226549676">(Feb 16 2021 at 17:50)</a>:</h4>
<p>Right.</p>



<a name="226549855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226549855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226549855">(Feb 16 2021 at 17:52)</a>:</h4>
<p>I like <span class="user-mention" data-user-id="125270">@scottmcm</span> 's criteria that <code>From</code> is usually appropriate for bidirectional conversions</p>



<a name="226549902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226549902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226549902">(Feb 16 2021 at 17:52)</a>:</h4>
<p>Like with arrays or vendor simd types</p>



<a name="226549958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226549958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226549958">(Feb 16 2021 at 17:52)</a>:</h4>
<p>eh, i don't know</p>



<a name="226549988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226549988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226549988">(Feb 16 2021 at 17:53)</a>:</h4>
<p>Basically something that doesn't convey some special meaning.  I do think that splatting is a special meaning</p>



<a name="226550012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550012">(Feb 16 2021 at 17:53)</a>:</h4>
<p>you could have <code>u8::from(bool)</code> and that'd be a reasonable impl</p>



<a name="226550033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550033">(Feb 16 2021 at 17:53)</a>:</h4>
<p>but not the inverse</p>



<a name="226550064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550064">(Feb 16 2021 at 17:53)</a>:</h4>
<p>that's why you need two From impls to go both ways</p>



<a name="226550067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550067">(Feb 16 2021 at 17:53)</a>:</h4>
<p>indeed, <code>bool as u8</code> works!</p>



<a name="226550069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550069">(Feb 16 2021 at 17:53)</a>:</h4>
<p>You could just as easily fill the last lane with the scalar and the rest with zeros.  On x86 I think that would be an even more appropriate conversion</p>



<a name="226550091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550091">(Feb 16 2021 at 17:54)</a>:</h4>
<p>It could be a TryFrom in the other direction</p>



<a name="226550141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550141">(Feb 16 2021 at 17:54)</a>:</h4>
<p>sure sure</p>



<a name="226550181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550181">(Feb 16 2021 at 17:54)</a>:</h4>
<p>f32::try_from(f32xN) // only works if all lanes are identical</p>



<a name="226550187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550187">(Feb 16 2021 at 17:54)</a>:</h4>
<p>wheee</p>



<a name="226550225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550225">(Feb 16 2021 at 17:54)</a>:</h4>
<p>Right but I do think that's special meaning</p>



<a name="226550253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550253">(Feb 16 2021 at 17:55)</a>:</h4>
<p>Which I think From probably shouldn't have?</p>



<a name="226550309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550309">(Feb 16 2021 at 17:55)</a>:</h4>
<p>There's no question what it does when converting from arrays or vendor types</p>



<a name="226550480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550480">(Feb 16 2021 at 17:56)</a>:</h4>
<p>I do think it's particularly confusing that on x86 an f32/f64 occupies an xmm register, which you could then interpret as a vector</p>



<a name="226550496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550496">(Feb 16 2021 at 17:56)</a>:</h4>
<p>oh god</p>



<a name="226550502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550502">(Feb 16 2021 at 17:57)</a>:</h4>
<p>Actually the same is true for neon as well</p>



<a name="226550521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550521">(Feb 16 2021 at 17:57)</a>:</h4>
<p>OH NO</p>



<a name="226550848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226550848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226550848">(Feb 16 2021 at 17:59)</a>:</h4>
<p>Oh wow we weren't testing <code>From&lt;Scalar&gt;</code> anyways?</p>



<a name="226551197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226551197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226551197">(Feb 16 2021 at 18:01)</a>:</h4>
<p>yeah nope.</p>



<a name="226551647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226551647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226551647">(Feb 16 2021 at 18:04)</a>:</h4>
<p><span class="user-mention" data-user-id="312331">@Caleb Zulawski</span> Actually I will say though that splatting is expected Rust semantics given, e.g.</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="fm">println!</span><span class="p">(</span><span class="s">"{:?}"</span><span class="p">,</span><span class="w"> </span><span class="p">[</span><span class="mf">3.0</span><span class="p">;</span><span class="w"> </span><span class="mi">4</span><span class="p">]);</span><span class="w"> </span><span class="c1">// [3.0, 3.0, 3.0, 3.0]</span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="226551834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226551834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226551834">(Feb 16 2021 at 18:05)</a>:</h4>
<p>I will also say though that implicit ty conversions are not. :^)</p>



<a name="226551879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226551879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226551879">(Feb 16 2021 at 18:06)</a>:</h4>
<p>Yeah that's an explicit syntax for array broadcasting</p>



<a name="226551925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226551925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226551925">(Feb 16 2021 at 18:06)</a>:</h4>
<p>Arrays don't implementation From for scalars either</p>



<a name="226552599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226552599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226552599">(Feb 16 2021 at 18:11)</a>:</h4>
<p><span class="user-mention silent" data-user-id="224471">Lokathor</span> <a href="#narrow/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E/near/226550012">said</a>:</p>
<blockquote>
<p>you could have <code>u8::from(bool)</code> and that'd be a reasonable impl<br>
but not the inverse</p>
</blockquote>
<p>My original statement was that <code>A: From&lt;B&gt;</code> is generally only reasonable if <code>B: TryFrom&lt;A&gt;</code> is reasonable.</p>
<p>I agree that <code>A: From&lt;B&gt;</code> obviously doesn't mean <code>B: From&lt;A&gt;</code> is reasonable.</p>



<a name="226552883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226552883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226552883">(Feb 16 2021 at 18:14)</a>:</h4>
<p>"bidirectional if you squint"</p>



<a name="226554216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226554216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226554216">(Feb 16 2021 at 18:21)</a>:</h4>
<p>I guess to summarize my point, I would expect <code>From&lt;f32&gt; for SimdF32&lt;4&gt;</code> to be <code>_mm_set1_ps</code> (which emits no instructions) rather than <code>_mm_broadcast_ps</code> (which emits a <code>vbroadcast</code>), though I think it's confusing enough that we should have explicit functions for each</p>



<a name="226554541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226554541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226554541">(Feb 16 2021 at 18:23)</a>:</h4>
<p>I think the really telling thing is that we didn't have the From conversion used implicitly or explicitly anywhere.</p>



<a name="226555217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226555217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226555217">(Feb 16 2021 at 18:29)</a>:</h4>
<p>I think the <code>From</code>/<code>Into</code> with arrays (and maybe tuples) are the obvious ones.  Scalars feel different enough from simd to me for <code>From</code> to be the wrong mechanism.</p>



<a name="226555324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226555324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226555324">(Feb 16 2021 at 18:30)</a>:</h4>
<p><code>let x: u8x8 = 1234_u128.to_le_bytes().into();</code> or similar seems fine.</p>



<a name="226555919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226555919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226555919">(Feb 16 2021 at 18:33)</a>:</h4>
<p>oh that's cute.</p>



<a name="226556044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226556044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226556044">(Feb 16 2021 at 18:34)</a>:</h4>
<p>Alternatively safe transmute whenever that's a thing</p>



<a name="226556128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226556128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226556128">(Feb 16 2021 at 18:35)</a>:</h4>
<p>(Although that will of course be <code>to_ne_bytes</code>)</p>



<a name="226556154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226556154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226556154">(Feb 16 2021 at 18:35)</a>:</h4>
<p>Ah true</p>



<a name="226556263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226556263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226556263">(Feb 16 2021 at 18:36)</a>:</h4>
<p>PPC tests are refusing to boot again and I don't want to play the same games I did last night for an actually significant diff.</p>



<a name="226556313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226556313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226556313">(Feb 16 2021 at 18:36)</a>:</h4>
<p>Tempted to move all those architectures to cross on gh actions</p>



<a name="226556351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226556351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226556351">(Feb 16 2021 at 18:37)</a>:</h4>
<p>I think it's actually because the travis config is misspecified.</p>



<a name="226556369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226556369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226556369">(Feb 16 2021 at 18:37)</a>:</h4>
<p>Oh maybe</p>



<a name="226556790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226556790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226556790">(Feb 16 2021 at 18:40)</a>:</h4>
<p>See, I try to retrigger the build for those and I get</p>
<blockquote>
<div class="codehilite"><pre><span></span><code> Oh no! An error occurred. The job could not be restarted.
</code></pre></div>

</blockquote>
<blockquote>
<p>Branch "no-scalar-from" not included per configuration. </p>
</blockquote>
<p>and I think it's that the API request that I'm sending is identified as a branch request.</p>



<a name="226556801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226556801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226556801">(Feb 16 2021 at 18:40)</a>:</h4>
<p>but we're set to "only master"</p>



<a name="226556842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226556842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226556842">(Feb 16 2021 at 18:40)</a>:</h4>
<p>also cross/MIPS with docker also failed because docker lol</p>



<a name="226556904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226556904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226556904">(Feb 16 2021 at 18:41)</a>:</h4>
<p>or I should say:<br>
our Travis config is making retriggering those builds more annoying than it should be, and cross is not an improvement.</p>



<a name="226557079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226557079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226557079">(Feb 16 2021 at 18:42)</a>:</h4>
<p>yeah when is safe transmute gonna be a thing</p>



<a name="226557084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226557084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226557084">(Feb 16 2021 at 18:43)</a>:</h4>
<p>he asked knowingly</p>



<a name="226557152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226557152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226557152">(Feb 16 2021 at 18:43)</a>:</h4>
<p>I do acknowledge Travis has gradually degraded towards being... unsuitable for our or anyone else's requirements, at least in FOSSware.</p>



<a name="226557174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/226557174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#226557174">(Feb 16 2021 at 18:43)</a>:</h4>
<p>hehe.</p>



<a name="227217245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/227217245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#227217245">(Feb 22 2021 at 04:02)</a>:</h4>
<p>amusing note: Rust is doing some Amazing generic inference on SIMD length.</p>



<a name="227217478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/227217478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#227217478">(Feb 22 2021 at 04:06)</a>:</h4>
<p>"what do you mean Jubilee?" "it's basically looking at the vector length I used elsewhere in a test and going 'huh so you want length N vectors, can do' and then things like splat automatically detect that."</p>



<a name="227218018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/227218018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#227218018">(Feb 22 2021 at 04:17)</a>:</h4>
<p>( mentioned here because type inference was discussed... my splats are doing some wild things like inferring the const lane size. )</p>



<a name="227222667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/227222667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#227222667">(Feb 22 2021 at 05:48)</a>:</h4>
<p>the inference system is actually pretty good but <em>the government</em> still doesn't want you having it work globally, just trying to make you do more paperwork writing types down everywhere!</p>



<a name="227222823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Removing%20From%3CScalar%3E/near/227222823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Removing.20From.3CScalar.3E.html#227222823">(Feb 22 2021 at 05:51)</a>:</h4>
<p>the inferring relational system (IRS) actually knows all the types but TurboType lobbies rustc to make you write down types and make the type system more complicated anyways.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>